package com.qingfeng.core.dao.qingfeng;


import com.qingfeng.core.config.database.BaseMapper;
import com.qingfeng.core.dao.BaseDao;
import com.qingfeng.core.entity.qingfeng.Ffman;
import com.qingfeng.core.mapper.qingfeng.FfmanMapper;
import com.qingfeng.core.utils.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @description: FAQ
 * @author:LWY
 * @date: 2017/10/16 17:15
 * @modified:
 */

@Repository
public class FfmanDao extends BaseDao<Ffman> {

    @Autowired
    FfmanMapper ffmanMapper;


    @Override
    protected BaseMapper<Ffman> getBaseMapper() {
        return ffmanMapper;
    }

    /**
     * 申请
     *
     * @param user_id 用户id
     */
    public void apply(String user_id) {
        Ffman ffman = new Ffman();
        ffman.setId(UuidUtil.generatorUUID());
        ffman.setUser_id(user_id);
        ffman.setCreate_time(new Date());
        insert(ffman);
    }
}
